package cn.controller;

import cn.utils.saveUtil;
import entity.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 朱颢阳
 * @description
 * @time 2024/10/12 09:57
 */

@RestController
@CrossOrigin
public class UploadController {
    @RequestMapping("/upload")
    public Result upload(MultipartFile multipartFile){
        String save = saveUtil.save(multipartFile);
        return Result.success(save);
    }
}